package com.yupi.yoj.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.yupi.yoj.model.dto.questionsubmit.QuestionSubmitQueryRequest;
import com.yupi.yoj.model.dto.questionsubmit.QuestionSubmitVO;
import com.yupi.yoj.model.entity.QuestionSubmit;
import com.baomidou.mybatisplus.extension.service.IService;
import org.redisson.api.RMap;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
* @author 46411
* @description 针对表【question_submit(题目提交)】的数据库操作Service
* @createDate 2024-09-23 23:37:52
*/
public interface QuestionSubmitService extends IService<QuestionSubmit> {

    Long addQuestionSubmit(QuestionSubmit questionSubmit);

    void updateQuestionSubmitById(QuestionSubmit questionSubmit);

    void deleteQuestionSubmitById(Long id);

    List<QuestionSubmitVO> getQuestionSubmitByUId(Long uid);

    List<QuestionSubmitVO> getQuestionSubmitByUIdQId(Long uid, Long qid);

    List<QuestionSubmitVO> getQuestionSubmitVO(List<QuestionSubmit> questionSubmitList);

    Wrapper<QuestionSubmit> getQueryWrapper(QuestionSubmitQueryRequest questionSubmitQueryRequest);

    String readFile(MultipartFile file);

    QuestionSubmitVO getQuestionSubmitVOById(Long id);

    void addQuestionSubmitTimes(Long userid);

    RMap<Integer, Integer> getSubmitCountByYear(Long userid);

    List<QuestionSubmit> getQuestionSubmitByIds(Long[] subids);
}
